<?php

namespace Admin\Controller;
use Admin\Model\UserLogModel;

class IndexController extends MainController{

    /**
     * 获取首页滚动广告位
     * @queyuan
     * @param $type;
     * 2016/05/31
     */
    public function indexAd(){
        $type = I("param.type");
        $result = array();
        if(!$type){
            $result['status'] = 1;
            $result['msg'] = "参数错误";
        }else{
            $ads = M("ad")->where("status = 1 and type = ".$type)->field("id,img,src_type,good_id,src")->order("ord desc")->select();
            $result['status'] = 0;
            $result['msg'] = "请求成功";
            $result['ads'] = $ads;
        }
        echo json_encode($result);
        exit;
    }

    /**
     * 获取首页最新开奖
     * @queyuan
     * 2016/05/31
     */
    public function indexNewLottery(){
        
    }
}
?>